package com.um.jdy.platform.activity.controller;


import com.um.jdy.platform.activity.manager.DiscountsStationManager;
import com.um.jdy.platform.station.entity.vo.StationItemVO;
import com.um.springboot.starter.annotation.ApiPermission;
import com.um.springboot.starter.annotation.TokenRequired;
import com.um.springboot.starter.orm.controller.BaseController;
import com.um.springboot.starter.orm.entity.Response;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.constraints.NotEmpty;
import java.util.List;

/**
 * 控制器：满减管理站场
 */
@RestController
@RequestMapping("/api/v1/cms/activity/discounts/station")
@Api(tags = "营销管理")
@ApiPermission("discounts_station")
@TokenRequired
public class DiscountsStationController extends BaseController<DiscountsStationManager> {

    @ApiPermission("list")
    @ApiOperation(value = "查询满减活动可用的站场")
    @GetMapping("list")
    public Response<List<StationItemVO>> getDiscountsStations(@ApiParam(value = "满减活动id") @NotEmpty String activity_discounts_id){
        return Response.success(manager.getDiscountsStations(activity_discounts_id));
    }

}
